<template>
  <!-- 种子线包装 -->
  <a-row>
    <a-col :span="12">
      <Item :deviceInfo="deviceInfo1" :detail="detail1" />
    </a-col>
    <a-col :span="12">
      <Item :deviceInfo="deviceInfo2" :detail="detail2" />
    </a-col>
  </a-row>
</template>

<script>
import '@/assets/less/TableExpand.less'
// import { getAction } from '@api/manage'
import Item from './components/item.vue'

export default {
  name: 'FastenerBoard',
  components: {
    Item
  },
  data() {
    return {
      deviceInfo1: {
        name: "螺丝锁附工站",
        img: require('@/assets/1.png'),
        id: "1",
        locations: [
          {
            left: '17.1%',
            top: '10.7%',
            tipLoc: 'left'
          },
          {
            left: '86%',
            top: '10.7%',
            tipLoc: 'right'
          },
          {
            left: '17.1%',
            top: '82.5%',
            tipLoc: 'left'
          },
          {
            left: '86%',
            top: '82.5%',
            tipLoc: 'right'
          }
        ]
      },
      deviceInfo2: {
        name: "功能测试工站",
        img: require('@/assets/2.png'),
        id: "2",
        locations: [
          {
            left: '50.6%',
            top: '90.5%',
            tipLoc: 'bottom'
          },
          {
            left: '58%',
            top: '90.5%',
            tipLoc: 'bottom'
          },
          {
            left: '65.7%',
            top: '90.5%',
            tipLoc: 'bottom'
          },
          {
            left: '72.3%',
            top: '90.5%',
            tipLoc: 'bottom'
          },
          {
            left: '79.6%',
            top: '90.5%',
            tipLoc: 'bottom'
          }
        ]
      },
      detail1: {
        aggregate: {
          woid: '202409050032',
          yield: 5000,
          pc: 50,
          ftq: 99.2,
          model: '华硕主板b610m-k',
          sn: '1325412381252',
          result: true,
        },
        logs: [
          {
            id: 1,
            ctime: '2024-09-18 22:08:00',
            log: '2024090511345502:35402528第4个螺丝锁 NG',
            result: true,
          },
          {
            id: 2,
            ctime: '2024-09-18 22:09:00',
            log: '2024090511345502:35402528第3个螺丝锁 OK',
            result: false,
          },
          {
            id: 3,
            ctime: '2024-09-18 22:10:00',
            log: '2024090511345502:35402528第2个螺丝锁 OK',
            result: true,
          },
        ],
        states: [
          {
            id: 1,
            name: '螺丝1',
            num: 1,
            torsion: 1.85,
            lap: 5.2,
            screwloose: true,
            float: true,
            result: false
          },
          {
            id: 2,
            name: '螺丝2',
            num: 2,
            torsion: 1.85,
            lap: 5.2,
            screwloose: true,
            float: true,
            result: true
          },
          {
            id: 3,
            name: '螺丝3',
            num: 3,
            torsion: 1.85,
            lap: 5.2,
            screwloose: true,
            float: true,
            result: true
          },
          {
            id: 4,
            name: '螺丝4',
            num: 4,
            torsion: 1.85,
            lap: 5.2,
            screwloose: true,
            float: true,
            result: true
          }
        ]
      },
      detail2: {
        aggregate: {
          woid: '202409050032',
          yield: 5000,
          pc: 50,
          ftq: 99.2,
          model: '华硕主板b610m-k',
          sn: '1325412381252',
          result: false,
        },
        logs: [
          {
            id: 1,
            ctime: '2024-09-18 22:08:00',
            log: '2024090511345502:35402528第4个螺丝锁 NG',
            result: true,
          },
          {
            id: 2,
            ctime: '2024-09-18 22:09:00',
            log: '2024090511345502:35402528第3个螺丝锁 OK',
            result: false,
          },
          {
            id: 3,
            ctime: '2024-09-18 22:10:00',
            log: '2024090511345502:35402528第2个螺丝锁 OK',
            result: true,
          },
        ],
        states: [
          {
            id: 1,
            name: 'HDMI-1',
            num: 1,
            result: false
          },
          {
            id: 2,
            name: 'USB-3',
            num: 2,
            result: true
          },
          {
            id: 3,
            name: 'USB-4',
            num: 3,
            result: true
          },
          {
            id: 4,
            name: 'USB-1',
            num: 4,
            result: true
          },
          {
            id: 5,
            name: 'USB-2',
            num: 5,
            result: true
          },
        ]
      }
    }
  },
  created() {
  },
  methods: {
    updateDetail1() {
      
    }
  }
}
</script>

<style scoped lang="less">
html,
.dashboard {
  width: 100vw;
  height: 100vh;
  padding: 0;
  margin: 0;
  overflow-y: hidden;
  display: flex;
  flex-direction: row;
  font-family: '微软雅黑' !important;

  .left,
  .right {
    flex: 1;
    width: 50%;
  }
}
</style>